<div class="grantleadings form">
<h2>Добавление записи</h2>
<h5>Тип добавляемой записи <?php echo $recordtypes[$recordtype_id]; ?></h5>
<?php 
	if ($recordtype_id == 2200)  {
	
	echo '<h6>Обязательно добавьте студентов соавторов на странице просмотра</h6>';
}	
?>
	<script>
    $(function() {
        $( ".datepicker" ).datepicker({ dateFormat: "yy-mm-dd" });
    });
    </script>
<?php echo $this->Form->create('Grantleading'); ?>
	<fieldset>
		<legend><?php echo __('Add Grantleading'); ?></legend>
				<?php 
			echo $this->form->hidden('recordtype_id', array('value' => $recordtype_id));
			
			if ($recordtype_id == 2100) {
				//echo $this->Form->input('with_students', array('label' => '',  'disabled' => '1'));
				echo $this->Form->hidden('with_students', array('value' => ''));
			} else {
				echo $this->Form->hidden('with_students', array('value' => '1'));
				//echo $this->Form->input('with_students', array('label' => '', 'checked' => 'checked'));
			}
		?>
		
		<table width="100%" class="invisibletable">
  <tr>
    <td align="right">Грант для КГМУ (да/нет)</td>
    <td align="right">&nbsp;</td>
    <td><?php echo $this->Form->input('for_kgmu', array('label' => '')); ?></td>
  </tr>
  <tr>
    <td width="15%" align="right">Грантодатель</td>
    <td width="2%" align="right"><font color="red">*</font></td>
    <td width="45%"><?php echo $this->Form->input('grantor', array('label' => '')); ?>
      
    </td>
  </tr>
  <tr>
    <td width="15%" align="right">Название гранта</td>
    <td width="2%" align="right"><font color="red">*</font></td>
    <td width="45%"><?php echo $this->Form->input('grant_name', array('label' => '')); ?>

	</td>
  </tr>
  <tr>
    <td align="right">Сумма гранта (в рублях)</td>
    <td align="right"><font color="red">*</font></td>
    <td><?php echo $this->Form->input('grantprice', array('label' => '')); ?></td>
  </tr>
  <tr>
    <td align="right">Дата начала гранта</td>
    <td align="right"><font color="red">*</font></td>
    <td><?php echo $this->Form->input('begindate', array('label' =>'', 'class' => 'datepicker', 'type'=>'text', 'size' => 10)); ?></td>
  </tr>
  <tr>
    <td align="right">Дата окончания гранта</td>
    <td align="right"><font color="red">*</font></td>
    <td><?php echo $this->Form->input('enddate', array('label' =>'', 'class' => 'datepicker', 'type'=>'text', 'size' => 10)); ?></td>
  </tr>
  <tr>
    <td align="right">ФИО руководителя гранта</td>
    <td align="right"><font color="red">*</font></td>
    <td><?php echo $this->Form->input('leader_name', array('label' => '')); ?></td>
  </tr>    
</table>
	<?php 
		echo $this->Form->hidden('recstatus_id', array('value' => '1'));
	?>
	</fieldset>
	<br />
<?php echo $this->Form->end(__('Submit')); ?>    
</div>
